package com.jacken.springcloudseatabank01.feign;

import com.jacken.springcloudseatabank01.entity.basic.Result;
import com.jacken.springcloudseatabank01.feign.fallback.BankFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author wangqiang
 * @version 1.0
 * @date 2020/10/8 9:47
 */
@FeignClient(name = "springcloud-seata-bank-02",fallback = BankFeignClientFallback.class)
public interface BankFeignClient {


    /**
     * 转账
     *
     * @param accountBalance 金额
     * @return String
     */
    @GetMapping("/bank2/transfer")
    Result transfer(@RequestParam("otherAccountNo") String otherAccountNo,
                    @RequestParam("accountBalance") Double accountBalance);
}
